package org.demo.warehouse.mapper;

import org.apache.ibatis.annotations.Select;
import org.demo.warehouse.common.pojo.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zgc
 * @since 2021-12-16
 */
public interface GoodsMapper extends BaseMapper<Goods> {

    @Select("select sum(amount) as `value`,id as `key` from goods group by id")
    List<Map<String, Object>> statistic();
}
